package com.zqh.myfmmall.clients;

import com.zqh.myfmmall.fallback.ProductSkuQueryClientFallback;
import com.zqh.myfmmall.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-02-22 21:20
 */
@FeignClient(value = "product-sku-query",fallbackFactory = ProductSkuQueryClientFallback.class)
public interface ProductSkuQueryClient{
    @PostMapping("productSku/getByIds")
    Result getByIds(@RequestBody List<String> ids);

    @PostMapping("productSku/getStockByIds")
    Result getStockByIds(@RequestBody List<String> ids);

    @GetMapping("productSku/getByProductId/{productId}")
    Result getByPorductId(@PathVariable("productId") String productId);

    @PostMapping("productSku/getProductsLowestPrice")
    Result getProductsLowestPrice(@RequestBody List<String> productIds);
}

